// Copyright 2018 Naftis Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//
// Reset CSS
// Adapted from http://github.com/necolas/normalize.css
// delected @media print edit by XMFE
// last update 08/07/2013 @sunxingfan
// --------------------------------------------------

/**
 * Updated by @sunxingfan: hgroup The label has been discarded.
 * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3.
 */
article,
aside,
details,
figcaption,
figure,
footer,
header,
  //hgroup,
main,
nav,
section {
  display: block;
}

/**
 * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
 */
audio,
canvas,
video {
  display: inline-block;
}

/**
 * Updated by @sunxingfan
 * Prevent modern browsers from displaying `audio` without controls.
 * Remove excess height in iOS 5 devices.
 */
audio:not([controls]) {
  display: none;
  height: 0;
}

/**
 * Added by @sunxingfan
 * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
 * Known issue: no IE 6 support.
 */
[hidden] {
  display: none;
}

// Base settings
// -------------------------

/**
 * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
 *    `em` units.
 * 2. Prevent iOS text size adjust after orientation change, without disabling
 *    user zoom.
 */


/**
 * Added by @sunxingfan
 * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
 */
b,
strong {
  font-weight: bold;
}

/**
 * Added by @sunxingfan
 * Address inconsistent and variable font size in all browsers.
 */
small {
  font-size: 80%;
}

/**
 * Prevent `sub` and `sup` affecting `line-height` in all browsers.
 */
sub,
sup {
  position: relative;
  font-size: 75%;
  line-height: 0;
  vertical-align: baseline;
}

sup {
  top: -0.5em;
}

sub {
  bottom: -0.25em;
}

// Img border in a's and image quality
// -------------------------

img {
  /* Responsive images (ensure images don't scale beyond their parents) */
  // max-width: 100%; /* Part 1: Set a maxium relative to the parent */
  height: auto; /* Part 2: Scale the height according to the width, otherwise you get stretching */
  vertical-align: middle;
  border: 0;
  -ms-interpolation-mode: bicubic;
}

form {
  margin: 0;
}

/**
 * 1. Correct font size not being inherited in all browsers.
 * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,
 *    and Chrome.
 * 3. Improve appearance and consistency in all browsers.
 */
button,
input,
select,
textarea {
  font-size: 100%; /* 1 */
  margin: 0; /* 2 */
  vertical-align: baseline; /* 3 */
  outline: none;
}

/**
 * Address Firefox 3+ setting `line-height` on `input` using `!important` in
 * the UA stylesheet.
 */
button,
input {
  line-height: normal;
  border: none;
  padding: 0;
}

/**
 * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
 *    and `video` controls.
 * 2. Correct inability to style clickable `input` types in iOS.
 * 3. Improve usability and consistency of cursor style between image-type
 *    `input` and others.
 */
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
  -webkit-appearance: button; /* 2 */
  -moz-appearance: button;
  appearance: button;
  cursor: pointer; /* 3 */
}

button[disabled],
html input[disabled] {
  cursor: default;
}

input[type="checkbox"],
input[type="radio"] {
  box-sizing: border-box; /*1*/
  padding: 0; /* 2 */
  margin: 0;
}

/**
 * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
 * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
 *    (include `-moz` to future-proof).
 */
input[type="search"] { // Appearance in Safari/Chrome
  box-sizing: content-box;
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  outline: none;
}

//chrome
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

//firefox
input[type="number"] {
  -moz-appearance: textfield;
}

/**
 * Remove inner padding and search cancel button in Safari 5 and Chrome
 * on OS X.
 */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
}

/**
 * Remove inner padding and border in Firefox 3+.
 */
button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

input::-webkit-input-placeholder { /* WebKit browsers */
  color: #ccc;
}

input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
  color: $grayLight;
}

input::-moz-placeholder { /* Mozilla Firefox 19+ */
  color: $grayLight;
}

input:-ms-input-placeholder { /* Internet Explorer 10+ */
  color: $grayLight;
}

/**
 * 1. Remove default vertical scrollbar in IE 6/7/8/9.
 * 2. Improve readability and alignment in all browsers.
 */
textarea {
  overflow: auto; /* 1 */
  vertical-align: top; /* 2 */
  resize: vertical;
}
textarea::-webkit-input-placeholder {
  /* WebKit browsers */
  color: #ccc;
}

textarea:-moz-placeholder {
  /* Mozilla Firefox 4 to 18 */
  color: $grayLight;
}

textarea::-moz-placeholder {
  /* Mozilla Firefox 19+ */
  color: $grayLight;
}

textarea:-ms-input-placeholder {
  /* Internet Explorer 10+ */
  color: $grayLight;
}

/* ==========================================================================
   Tables
   ========================================================================== */

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/**
*td {
*  vertical-align: top
*}
*/

th, td {
  padding: 0
}

body, dl, dd, ul, ol, h1, h2, h3, h4, h5, h6, p, figure, menu {
  margin: 0
}

ul, ol, menu {
  padding: 0;
  list-style: none
}

h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
}

div, ul, li, p, a, span, img, header {
  box-sizing: border-box;
}

ul, li, ol{
  list-style: none;
}
